import { createSlice } from "@reduxjs/toolkit";

export const index = createSlice({
  name: "index",
  initialState: {
    menu: localStorage.getItem("menu") || "综合",
    noChangeHeaderRouterList: ["/setting/userInfo"],
  },
  reducers: {
    setMenu: (state, action) => {
      state.menu = action.payload;
    },
  },
});

export const { setMenu } = index.actions;

export default index.reducer;
